programming4us
           
 
 
Programming

Visual Basic 2010 : Deploying Applications with ClickOnce - Registration-Free COM

- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019
7/11/2013 4:02:19 AM

One of the biggest benefits from ClickOnce is that users that do not have administrator permissions can install applications. By the way, there are situations in which an application is deployed together with some COM libraries but this can be a problem because such libraries need to be registered and a non-administrator user does not have the appropriate permissions for this. Fortunately with ClickOnce you can take advantage of a technique known as Registration-Free COM which basically makes a reference to a COM library visible to the application only, without the need of registration. You simply need to right-click the library name in Solution Explorer, References and then select Properties. Finally set the Isolated property as True (see Figure 1).

Figure 1. Isolating the library for Registration-Free COM.


When you build the project, Visual Studio also generates a manifest file that provides the actual state of isolation of the library. Listing 1 shows a sample manifest file.

Listing 1. Sample Manifest for Registration-Free COM
<?xml version="1.0" encoding="utf-8"?>
<assembly xsi:schemaLocation="urn:schemas-microsoft-com:asm.v1 assem-
bly.adaptive.xsd"
          manifestVersion="1.0" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1"
          xmlns:asmv2="urn:schemas-microsoft-com:asm.v2"
          xmlns:asmv3="urn:schemas-microsoft-com:asm.v3"
          xmlns:dsig="http://www.w3.org/2000/09/xmldsig#"
          xmlns:co.v1="urn:schemas-microsoft-com:clickonce.v1"
          xmlns:co.v2="urn:schemas-microsoft-com:clickonce.v2"
          xmlns="urn:schemas-microsoft-com:asm.v1"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <assemblyIdentity name="Native.MyCOMLibrary" version="1.0.0.0" type="win32" />
  <file name="wmp.dll" asmv2:size="11406336">
    <hash xmlns="urn:schemas-microsoft-com:asm.v2">
      <dsig:Transforms>
        <dsig:Transform
         Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
      </dsig:Transforms>
      <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" />
      <dsig:DigestValue>cCyT3Cw0dm68HkliYf3ncYjoCKU=</dsig:DigestValue>
    </hash>
    <typelib tlbid="{6bf52a50-394a-11d3-b153-00c04f79faa6}"
         version="1.0" helpdir="" resourceid="0" flags="HASDISKIMAGE" />
    <comClass clsid="{6bf52a52-394a-11d3-b153-00c04f79faa6}"
              threadingModel="Apartment"
              tlbid="{6bf52a50-394a-11d3-b153-00c04f79faa6}"
              progid="WMPlayer.OCX.7"
              description="Windows Media Player ActiveX Control" />
  </file>
</assembly>

					  

The manifest file is part of the setup process, so you need to include it in your ClickOnce deployment (Visual Studio takes care for you). If you are interested in understanding how the Registration-Free COM technique actually works, you can read a specific article in the MSDN Magazine available at this address: http://msdn.microsoft.com/en-us/magazine/cc188708.aspx.

Other -----------------
- Visual Basic 2010 : Deploying Applications with ClickOnce - Security Considerations, Programmatically Accessing ClickOnce
- Visual Basic 2010 : Deploying Applications with ClickOnce - Configuring ClickOnce
- Visual Basic 2010 : Deploying Applications with ClickOnce
- ASP.NET 4 in VB 2010 : Site Maps (part 3) - Binding Portions of a Site Map, The SiteMap Class
- ASP.NET 4 in VB 2010 : Site Maps (part 2) - Binding an Ordinary Page to a Site Map, Binding a Master Page to a Site Map
- ASP.NET 4 in VB 2010 : Site Maps (part 1) - Defining a Site Map
- DirectX 10 Game Programming : Shaders and Effects - Vertex Shaders
- DirectX 10 Game Programming : Shaders and Effects - High Level Shading Language
- DirectX 10 Game Programming : Shaders and Effects - Effect Files
- Programming Windows Services with Microsoft Visual Basic 2008 : Services and Polling - Updating the Service Events
- Programming Windows Services with Microsoft Visual Basic 2008 : Services and Polling - Adding a Module File, Adding New Polling Code
- Microsoft Visual Studio 2010 : Using the Concurrency Visualizer (part 3) - The Cores View
- Microsoft Visual Studio 2010 : Using the Concurrency Visualizer (part 2) - CPU Utilization View, The Threads View
- Microsoft Visual Studio 2010 : Using the Concurrency Visualizer (part 1)
- Microsoft Visual Studio 2010 : Reports and Debugging - Using the Parallel Stacks Window
- Microsoft Visual Studio 2010 : Reports and Debugging - Using the Parallel Tasks Window
- Microsoft Visual Studio 2010 : Debugging with Visual Studio 2010 (part 2) - Debugging Threads
- Microsoft Visual Studio 2010 : Debugging with Visual Studio 2010 (part 1) - Live Debugging, Performing Post-Mortem Analysis
- .NET Components : Serialization and Class Hierarchies (part 2) - Manual Base-Class Serialization
- .NET Components : Serialization and Class Hierarchies (part 1) - Custom Serialization and Base Classes
 
 
 
Top 10
 
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
- First look: Apple Watch

- 3 Tips for Maintaining Your Cell Phone Battery (part 1)

- 3 Tips for Maintaining Your Cell Phone Battery (part 2)
programming4us programming4us